<?php
include "stream.php";
class IRCStream {
	protected $fp = null;
	private $server = null;
	private $port = null;
	
	public function Open($server, $port) {
		$this->fp = new SockStream();
		$this->fp->Open($server, $port);
	}
	public function Close() {
		$this->fp->Close();
	}
	public function Send($send) {
		$send.='\n\r';
		$this->fp->Write($send, strlen($send));
	}
	public function Recv($length=1024) {
		$read=$this->fp->Read($length);
		return $read;
	}
	public function GetStream() {
		return $this->fp;
	}
}
?>